Skip to content

TEST-33: Mainnet governance config validation tests#432

Merged
mtabasco merged 3 commits intossv-stakingfrom
test/mainnet-config-validation
Feb 25, 2026
Merged

TEST-33: Mainnet governance config validation tests#432
mtabasco merged 3 commits intossv-stakingfrom
test/mainnet-config-validation

Conversation

@liorrutenberg
Copy link

Summary

  • Add comprehensive test suite (test/unit/mainnet-config-validation.test.ts) validating SSV Network system behavior with exact mainnet deployment parameters from deployments/hoodi-upgrade.config.json
  • Covers all 8 required test scenarios with 21 individual test cases:
    1. Packability — Verifies config fee values survive pack/unpack round-trip; documents which spreadsheet values are NOT packable
    2. Liquidation threshold math — Computes burn-rate-based threshold; verifies minimumLiquidationCollateral dominates; tests exact boundary (strict less-than)
    3. Operator fee boundaries — Accepts fees at min/max; rejects fees one step below min and above max via declareOperatorFee
    4. Cluster burn rate — Pure arithmetic for 1/4/13 validators; on-chain balance verification after simulated N blocks
    5. Cooldown duration — 604,800s (7 days) in block.timestamp seconds; cannot claim at half-cooldown, can claim after full cooldown
    6. Quorum — 4 oracles at 75% threshold: 2 votes (50%) fails, 3 votes (75%) commits root
    7. Liquidation collateral — Cluster with deposit ≥ collateral is safe; cluster becomes liquidatable when balance drops below minimumLiquidationCollateralEth
    8. Long-running clusters — 1-year (~2.6M blocks) simulation: no uint64 overflow in fee indices; balance accounting remains correct

Test plan

  • All 21 test cases pass (npx hardhat test test/unit/mainnet-config-validation.test.ts)
  • Full test suite shows no regressions (pre-existing gas-tracking failures only)

🤖 Generated with Claude Code

Add comprehensive test suite validating SSV Network behavior with exact
mainnet deployment parameters from hoodi-upgrade.config.json. Covers 8
test scenarios across packability, liquidation threshold, operator fee
boundaries, cluster burn rate, cooldown duration, quorum, liquidation
collateral, and long-running cluster overflow checks (21 test cases).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 17, 2026

Gas Usage Report

Commit: 17bef0d
Branch: HEAD
All within limits: Yes

All operations are within gas limits.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive test suite that validates SSV Network system behavior using exact mainnet deployment parameters from deployments/hoodi-upgrade.config.json. The test file covers 8 critical scenarios with 21 individual test cases validating packability, liquidation mechanics, operator fee boundaries, burn rates, cooldown periods, quorum voting, and long-running cluster scenarios.

Changes:

  • Added test/unit/mainnet-config-validation.test.ts with 730 lines of comprehensive tests covering all mainnet governance parameters and edge cases
  • Updated package-lock.json with dependency metadata changes (peer flags)

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 9 comments.

File Description
test/unit/mainnet-config-validation.test.ts New comprehensive test suite validating 8 scenarios: packability of fee values, liquidation threshold calculations, operator fee boundaries, cluster burn rates, cooldown duration mechanics, quorum voting with 4 oracles at 75%, liquidation collateral thresholds, and 1-year cluster simulations
package-lock.json Automatic dependency metadata updates (peer flags) from npm

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* adjust defaultOperatorEthFee mainnet value
* cleanup comments
* add more cases
* avoid hardcoding where possible
* feat: introduce params json
* feat: add validation tests for the params
---------
@mtabasco mtabasco merged commit bd61aa8 into ssv-staking Feb 25, 2026
11 checks passed
@mtabasco mtabasco deleted the test/mainnet-config-validation branch February 25, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants